package study.example;

import static junit.framework.Assert.assertEquals;

import org.junit.Test;

public class CalculatorTest {

	Calculator calculator = new Calculator();

	@Test
	public void testSum_Success() {
		int a = 5;
		int b = 5;
		
		int actual = calculator.sum(a, b);
		
		
		assertEquals(10, actual);
	}
	
	@Test
	public void testDivide() {
		int a = 0;
		int b = 6;
		
		int actual = calculator.divide(a, b);
		
		assertEquals(0, actual);
	}
	
	@Test (expected=ArithmeticException.class) 
	public void testDivide_F() {
		int a = 6;
		int b = 0;
		
		int actual = calculator.divide(a, b);
		
		assertEquals(0, actual);
	}
	
	

}
